<!--{Atemplate tpl/header}-->

<!--{eval echo $this->Ahtml_js_aurl();}-->
<script src="/plugin/My97DatePicker/WdatePicker.js"></script>
<script>
function checkall(value) {
	if(value=='0'){
		jQuery(".checkbox").attr("checked","checked");
	}
	if(value=='1'){
		jQuery(".checkbox").removeAttr("checked","checked");
	}
	if(value=='auth'){
		var chkall = jQuery("input:checked").val();
		if(chkall == null){
			alert('请先选择');
			return false;
		}else{
			return true;
		}
	}
}

</script>
<form action="" method="get" class="_crmtop">
	<select name="sop">
		<option value="">模糊查询</option>
		<!--{loop $column_sop $key $val}-->
		<option value="$key" <!--{if $key==$post[sop]}-->selected="selected"<!--{/if}-->>$val</option>
		<!--{/loop}-->
	</select>
	<input type="text" name="search" value="$post[search]" size="20"/>
	最后操作人
	<select name="last_uid">
		<!--{loop $userkv $key $val}-->
		<option value="$key" <!--{if $key==$post[last_uid]}-->selected="selected"<!--{/if}-->>$val</option>
		<!--{/loop}-->
	</select>
	按时间查找
	<select name="sop_time">
		<!--{loop $column_sop_time $key $val}-->
		<option value="$key" <!--{if $key==$post[sop]}-->selected="selected"<!--{/if}-->>$val</option>
		<!--{/loop}-->
	</select>
	<input type="text" name="s_time[]" value="$post[s_time][0]" size="20" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
	<input type="text" name="s_time[]" value="$post[s_time][1]" size="20" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
	<input type="submit" value="搜索">
</form>
<form id="form_pool" action="$this->Amodr-pool_add" method="POST">
<div class="-main_list _customer_my">
<table class="-table">
	<tr>
		<th><b>序号</b></th>
	<!--{loop $column $key $val}-->
		<th><b><a href="$page->theurl-aorder-$key,$pages->neworder$pages->other">$val</a></b></th>
	<!--{/loop}-->
	</tr>
<!--{eval $i=0;}-->
<!--{loop $list $key $val}-->
<!--{eval
$i++;
$val[area] = $areac->title($val[area]);
}-->
	<tr>
		<td><input type="checkbox" name="save[]" class="checkbox" value="$val[$key_name]">$i</td>
		<!--{eval echo $obj->for_html($key,$val,$column,$this->model);}-->
	</tr>
<!--{/loop}-->
</table>
</div>
</form>

<div class="_crmnav">
	<span class="_info">客户条数：$page->counts
		<input type="button" onclick="javascript:checkall(0);" value="全选" >
		<input type="button" onclick="javascript:checkall(1);" value="反选">
		<input type="button" value="添加为我的客户" onclick="jQuery('#form_pool').submit()">
	</span>
	<div class="_page">
		$pages->html
		<!--<input type="number" size="8">
		<input type="button" value="跳转">-->
	</div>
<!--{eval
$crmnav = array(
	'现货'			=>'&xianhuo=1&sign_status=2',
	'签约异常'		=>'&sign_status=3',
	'签约成功'		=>'&sign_status=2',
	'签约'			=>'&sign_status=1',
	'重点'			=>'&point=1',
	'七天内联系'	=>'&lianxi=1',
	'七到三十天'	=>'&lianxi=2',
	'三十天以上'	=>'&lianxi=3',
	'预计开户'		=>'&outlook=1',
	'全部'			=>''
);
$crmnavnum = count($crmnav);
$navi = 0;
}-->
	<div class="_menu">
	<!--{loop $crmnav $key $val}-->
		<!--{eval $navi++;
			$navclass = '';
			if($navi==$post[nav] || (empty($post[nav]) && $navi==$crmnavnum)){
				$navclass = 'class="_chk"';
			}
		}-->
		<span $navclass><a href="$this->Aactr-$this->id?nav=$navi{$val}">$key</a></span>
	<!--{/loop}-->
	</div>
</div>

<!--{Atemplate tpl/nofooter}-->